#include "gui/MainWindow.h"
#include "gears/IfcGears.h"
#include "gears/ref_ptr.h"

#include <QtGui/QApplication>

#include <iostream>
#include <sstream>
using namespace std;


#ifdef __GNUC__
#include <tr1/memory>
#define SHARED_PTR std::tr1::shared_ptr
#else
#ifdef _MSC_VER
#include <memory>
#define SHARED_PTR std::tr1::shared_ptr
#else
#include <boost/shared_ptr.hpp>
#define SHARED_PTR boost::shared_ptr
#endif
#endif


#define _CRTDBG_MAP_ALLOC
#include <stdlib.h>
#include <crtdbg.h>
#define MEM_CHECK

int main(int argc, char *argv[])
{
	QApplication a(argc, argv);
	Q_INIT_RESOURCE( resources );

	QPixmap pixmap( ":Resources/img/IfcGearsSplashscreen.png" );
	QSplashScreen splash( pixmap );
	splash.show();
	a.processEvents();

	IfcGears class_generator;
	MainWindow w( &class_generator );
	w.show();
	QTimer::singleShot( 1500, &splash, SLOT(close()));
	a.processEvents();

	//_CrtDumpMemoryLeaks();
	return a.exec();
}
